package com.caspar.hoe;

import java.util.HashMap;
import java.util.Map;

/**
 * HTML special character encoding table
 * 
 * @author caspar.chen
 */
public class HtmlCharCode {

	public static final Map<String, HtmlChar> DECODED_ENTITIES = new HashMap<String, HtmlChar>() {
		private static final long serialVersionUID = 1L;
		{
			put("\"", new HtmlChar("\"", "&quot;", "&#34;"));
			put(" ", new HtmlChar(" ", "&nbsp;", "&#160;"));
			put("'", new HtmlChar("'", "&apos;", "&#39;"));
			put("<", new HtmlChar("<", "&lt;", "&#60;"));
			put(">", new HtmlChar(">", "&gt;", "&#62;"));
			put("¡", new HtmlChar("¡", "&iexcl;", "&#161;"));
			put("¢", new HtmlChar("¢", "&cent;", "&#162;"));
			put("£", new HtmlChar("£", "&pound;", "&#163;"));
			put("¤", new HtmlChar("¤", "&curren;", "&#164;"));
			put("¥", new HtmlChar("¥", "&yen;", "&#165;"));
			put("¦", new HtmlChar("¦", "&brvbar;", "&#166;"));
			put("§", new HtmlChar("§", "&sect;", "&#167;"));
			put("¨", new HtmlChar("¨", "&uml;", "&#168;"));
			put("©", new HtmlChar("©", "&copy;", "&#169;"));
			put("ª", new HtmlChar("ª", "&ordf;", "&#170;"));
			put("«", new HtmlChar("«", "&laquo;", "&#171;"));
			put("¬", new HtmlChar("¬", "&not;", "&#172;"));
			put("­", new HtmlChar("­", "&shy;", "&#173;"));
			put("®", new HtmlChar("®", "&reg;", "&#174;"));
			put("¯", new HtmlChar("¯", "&macr;", "&#175;"));
			put("°", new HtmlChar("°", "&deg;", "&#176;"));
			put("±", new HtmlChar("±", "&plusmn;", "&#177;"));
			put("²", new HtmlChar("²", "&sup2;", "&#178;"));
			put("³", new HtmlChar("³", "&sup3;", "&#179;"));
			put("´", new HtmlChar("´", "&acute;", "&#180;"));
			put("µ", new HtmlChar("µ", "&micro;", "&#181"));
			put("Α", new HtmlChar("Α", "&Alpha;", "&#913;"));
			put("Β", new HtmlChar("Β", "&Beta;", "&#914;"));
			put("Γ", new HtmlChar("Γ", "&Gamma;", "&#915;"));
			put("Δ", new HtmlChar("Δ", "&Delta;", "&#916;"));
			put("Ε", new HtmlChar("Ε", "&Epsilon;", "&#917;"));
			put("Ζ", new HtmlChar("Ζ", "&Zeta;", "&#918;"));
			put("Η", new HtmlChar("Η", "&Eta;", "&#919;"));
			put("Θ", new HtmlChar("Θ", "&Theta;", "&#920;"));
			put("Ι", new HtmlChar("Ι", "&Iota;", "&#921;"));
			put("Κ", new HtmlChar("Κ", "&Kappa;", "&#922;"));
			put("Λ", new HtmlChar("Λ", "&Lambda;", "&#923;"));
			put("Μ", new HtmlChar("Μ", "&Mu;", "&#924;"));
			put("Ν", new HtmlChar("Ν", "&Nu;", "&#925;"));
			put("Ξ", new HtmlChar("Ξ", "&Xi;", "&#926;"));
			put("Ο", new HtmlChar("Ο", "&Omicron;", "&#927;"));
			put("Π", new HtmlChar("Π", "&Pi;", "&#928;"));
			put("Ρ", new HtmlChar("Ρ", "&Rho;", "&#929;"));
			put("Σ", new HtmlChar("Σ", "&Sigma;", "&#931;"));
			put("Τ", new HtmlChar("Τ", "&Tau;", "&#932;"));
			put("Υ", new HtmlChar("Υ", "&Upsilon;", "&#933;"));
			put("Φ", new HtmlChar("Φ", "&Phi;", "&#934;"));
			put("Χ", new HtmlChar("Χ", "&Chi;", "&#935;"));
			put("Ψ", new HtmlChar("Ψ", "&Psi;", "&#936;"));
			put("Ω", new HtmlChar("Ω", "&Omega;", "&#937;"));
			put("α", new HtmlChar("α", "&alpha;", "&#945;"));
			put("β", new HtmlChar("β", "&beta;", "&#946;"));
			put("γ", new HtmlChar("γ", "&gamma;", "&#947;"));
			put("δ", new HtmlChar("δ", "&delta;", "&#948;"));
			put("ε", new HtmlChar("ε", "&epsilon;", "&#949;"));
			put("ζ", new HtmlChar("ζ", "&zeta;", "&#950;"));
			put("η", new HtmlChar("η", "&eta;", "&#951;"));
			put("θ", new HtmlChar("θ", "&theta;", "&#952;"));
			put("ι", new HtmlChar("ι", "&iota;", "&#953;"));
			put("κ", new HtmlChar("κ", "&kappa;", "&#954;"));
			put("λ", new HtmlChar("λ", "&lambda;", "&#955;"));
			put("μ", new HtmlChar("μ", "&mu;", "&#956;"));
			put("ν", new HtmlChar("ν", "&nu;", "&#957;"));
			put("ξ", new HtmlChar("ξ", "&xi;", "&#958;"));
			put("ο", new HtmlChar("ο", "&omicron;", "&#959;"));
			put("π", new HtmlChar("π", "&pi;", "&#960;"));
			put("ρ", new HtmlChar("ρ", "&rho;", "&#961;"));
			put("ς", new HtmlChar("ς", "&sigmaf;", "&#962;"));
			put("σ", new HtmlChar("σ", "&sigma;", "&#963;"));
			put("τ", new HtmlChar("τ", "&tau;", "&#964;"));
			put("υ", new HtmlChar("υ", "&upsilon;", "&#965;"));
			put("φ", new HtmlChar("φ", "&phi;", "&#966;"));
			put("χ", new HtmlChar("χ", "&chi;", "&#967;"));
			put("ψ", new HtmlChar("ψ", "&psi;", "&#968;"));
			put("ω", new HtmlChar("ω", "&omega;", "&#969;"));
			put("ϑ", new HtmlChar("ϑ", "&thetasym;", "&#977;"));
			put("ϒ", new HtmlChar("ϒ", "&upsih;", "&#978;"));
			put("ϖ", new HtmlChar("ϖ", "&piv;", "&#982;"));
			put("•", new HtmlChar("•", "&bull;", "&#8226;"));
			put("…", new HtmlChar("…", "&hellip;", "&#8230;"));
			put("′", new HtmlChar("′", "&prime;", "&#8242;"));
			put("″", new HtmlChar("″", "&Prime;", "&#8243;"));
			put("‾", new HtmlChar("‾", "&oline;", "&#8254;"));
			put("⁄", new HtmlChar("⁄", "&frasl;", "&#8260;"));
			put("ℑ", new HtmlChar("ℑ", "&image;", "&#8465;"));
			put("℘", new HtmlChar("℘", "&weierp;", "&#8472;"));
			put("ℜ", new HtmlChar("ℜ", "&real;", "&#8476;"));
			put("™", new HtmlChar("™", "&trade;", "&#8482;"));
			put("ℵ", new HtmlChar("ℵ", "&alefsym;", "&#8501;"));
			put("←", new HtmlChar("←", "&larr;", "&#8592;"));
			put("↑", new HtmlChar("↑", "&uarr;", "&#8593;"));
			put("→", new HtmlChar("→", "&rarr;", "&#8594;"));
			put("↓", new HtmlChar("↓", "&darr;", "&#8595;"));
			put("↔", new HtmlChar("↔", "&harr;", "&#8596;"));
			put("↵", new HtmlChar("↵", "&crarr;", "&#8629;"));
			put("⇐", new HtmlChar("⇐", "&lArr;", "&#8656;"));
			put("⇑", new HtmlChar("⇑", "&uArr;", "&#8657;"));
			put("⇒", new HtmlChar("⇒", "&rArr;", "&#8658;"));
			put("⇓", new HtmlChar("⇓", "&dArr;", "&#8659;"));
			put("⇔", new HtmlChar("⇔", "&hArr;", "&#8660;"));
			put("∀", new HtmlChar("∀", "&forall;", "&#8704;"));
			put("∂", new HtmlChar("∂", "&part;", "&#8706;"));
			put("∃", new HtmlChar("∃", "&exist;", "&#8707;"));
			put("∅", new HtmlChar("∅", "&empty;", "&#8709;"));
			put("∇", new HtmlChar("∇", "&nabla;", "&#8711;"));
			put("∈", new HtmlChar("∈", "&isin;", "&#8712;"));
			put("∉", new HtmlChar("∉", "&notin;", "&#8713;"));
			put("∋", new HtmlChar("∋", "&ni;", "&#8715;"));
			put("∏", new HtmlChar("∏", "&prod;", "&#8719;"));
			put("∑", new HtmlChar("∑", "&sum;", "&#8722;"));
			put("−", new HtmlChar("−", "&minus;", "&#8722;"));
			put("∗", new HtmlChar("∗", "&lowast;", "&#8727;"));
			put("√", new HtmlChar("√", "&radic;", "&#8730;"));
			put("∝", new HtmlChar("∝", "&prop;", "&#8733;"));
			put("∞", new HtmlChar("∞", "&infin;", "&#8734;"));
			put("∠", new HtmlChar("∠", "&ang;", "&#8736;"));
			put("∧", new HtmlChar("∧", "&and;", "&#8869;"));
			put("∨", new HtmlChar("∨", "&or;", "&#8870;"));
			put("∩", new HtmlChar("∩", "&cap;", "&#8745;"));
			put("∪", new HtmlChar("∪", "&cup;", "&#8746;"));
			put("∫", new HtmlChar("∫", "&int;", "&#8747;"));
			put("∴", new HtmlChar("∴", "&there4;", "&#8756;"));
			put("∼", new HtmlChar("∼", "&sim;", "&#8764;"));
			put("≅", new HtmlChar("≅", "&cong;", "&#8773;"));
			put("≈", new HtmlChar("≈", "&asymp;", "&#8773;"));
			put("≠", new HtmlChar("≠", "&ne;", "&#8800;"));
			put("≡", new HtmlChar("≡", "&equiv;", "&#8801;"));
			put("≤", new HtmlChar("≤", "&le;", "&#8804;"));
			put("≥", new HtmlChar("≥", "&ge;", "&#8805;"));
			put("⊂", new HtmlChar("⊂", "&sub;", "&#8834;"));
			put("⊃", new HtmlChar("⊃", "&sup;", "&#8835;"));
			put("⊄", new HtmlChar("⊄", "&nsub;", "&#8836;"));
			put("⊆", new HtmlChar("⊆", "&sube;", "&#8838;"));
			put("⊇", new HtmlChar("⊇", "&supe;", "&#8839;"));
			put("⊕", new HtmlChar("⊕", "&oplus;", "&#8853;"));
			put("⊗", new HtmlChar("⊗", "&otimes;", "&#8855;"));
			put("⊥", new HtmlChar("⊥", "&perp;", "&#8869;"));
			put("⋅", new HtmlChar("⋅", "&sdot;", "&#8901;"));
			put("⌈", new HtmlChar("⌈", "&lceil;", "&#8968;"));
			put("⌉", new HtmlChar("⌉", "&rceil;", "&#8969;"));
			put("⌊", new HtmlChar("⌊", "&lfloor;", "&#8970;"));
			put("⌋", new HtmlChar("⌋", "&rfloor;", "&#8971;"));
			put("◊", new HtmlChar("◊", "&loz;", "&#9674;"));
			put("♠", new HtmlChar("♠", "&spades;", "&#9824;"));
			put("♣", new HtmlChar("♣", "&clubs;", "&#9827;"));
			put("♥", new HtmlChar("♥", "&hearts;", "&#9829;"));
			put("♦", new HtmlChar("♦", "&diams;", "&#9830;"));

		}
	};

}
